package com.prp.gwt.client.widgets.entry;

import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class WelcomeView extends VerticalPanel {

	private static WelcomeView instance;
	private DeckPanel deckPanel = new DeckPanel();
	
	public static WelcomeView getInstance(){
		if(instance == null)
			instance = new WelcomeView();
		return instance;
	}
	
	private WelcomeView(){
		setWidth("100%");
		setHorizontalAlignment(ALIGN_CENTER);
		HorizontalPanel hPanel = new HorizontalPanel();
		deckPanel.add(SignInPanel.getInstance());
		deckPanel.add(ForgetPasswordPanel.getInstance());
		hPanel.add(deckPanel);
		add(hPanel);
		showWidget(0);
	}
	
	public void showWidget(int index){
		deckPanel.showWidget(index);
	}
	
}
